<?php
namespace Controllers;
use Models\Category;
use Models\News;

class HomeController extends CommonController {

    public function index() {
        $data = [];
        $categoryModel = new Category();
        $categories = $categoryModel->getAllCategory();
        $data['categories'] = $categories;
        $newsModel = new News();
        $hotSport = $newsModel->getHot(2);
        $data['hotSport'] = $hotSport;

        return $this->render('home/index', $data);
    }
}